package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.entity.BtyCwHuopei;
import cn.stylefeng.guns.sys.modular.system.entity.Huopei;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyCwHuopeiParam;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyCwHpDto;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyCwHuopeiResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 货赔表 服务类
 * </p>
 *
 * @author 
 * @since 2021-11-02
 */
public interface BtyCwHuopeiService extends IService<BtyCwHuopei> {

    /**
     * 新增
     *
     * @author 
     * @Date 2021-11-02
     */
    void add(BtyCwHuopeiParam param);

    /**
     * 删除
     *
     * @author 
     * @Date 2021-11-02
     */
    void delete(BtyCwHuopeiParam param);

    /**
     * 更新
     *
     * @author 
     * @Date 2021-11-02
     */
    void update(BtyCwHuopeiParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author 
     * @Date 2021-11-02
     */
    BtyCwHuopeiResult findBySpec(BtyCwHuopeiParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author 
     * @Date 2021-11-02
     */
    List<BtyCwHuopeiResult> findListBySpec(BtyCwHuopeiParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author 
     * @Date 2021-11-02
     */
     LayuiPageInfo findPageBySpec(BtyCwHuopeiParam param, String date);

     LayuiPageInfo hpList(BtyCwHuopeiParam param, String date, Long provinceId, Long cityId);

    /**
     * 导入excel
     * @param fileName
     * @param file
     * @return
     */
    Boolean batchImport(String fileName, MultipartFile file) throws Exception;

    List<BtyCwHuopei> getHuopei(BtyCwHuopei btyCwHuopei, String date);

    ResponseEntity<byte[]> exportExcel(HttpServletRequest request, HttpServletResponse response,
                                       String shopName, Date beginTime, String shopCode, String date, Date endTime);

    ResponseEntity<byte[]> exportHp(HttpServletRequest request, HttpServletResponse response,
                                       String shopName, Date beginTime, String shopCode, String date, Date endTime);

    List<BtyCwHuopei> exportHuopei(BtyCwHuopei param, String date);

    ResponseData editHuopei(BtyCwHuopei btyCwHuopei);

    List dmList();

    /**
     * 同步酒水卖价
     * @return
     */
    ResponseData editJsmj(String date);

    ResponseData editPankui(List<BtyCwHuopei> list);

    List<BtyCwHuopeiResult> exportList(String date);

    ResponseData editDdjs(String date, String shopCode);

    ResponseData editHp(String date);

    ResponseData cityList();

    ResponseData cityNameList(Long pid);

    Boolean insertHp(List<BtyCwHpDto> list, List<String> codeList, String end, String begin) throws Exception;

    ResponseData sendMsg(String date, Long provinceId, Long cityId);

    ResponseData scmDetail(List<String> storeIdList, String startTime, String endTime);

    ResponseData editDdhp(String date, String shopCode);

    ResponseData editHpPankui(List<BtyCwHuopei> list);

    ResponseData editPrice(String date);

    ResponseEntity<byte[]> exportBatch(HttpServletRequest request, HttpServletResponse response, String date);
}
